package form

import (
    "hitme/go-api/models"
)

type (
    PhotoSpecGetListReqForm struct {
        PaginationRequest
        SpecName string `form:"spec_name" json:"spec_name"`
        IsHot    int8   `form:"is_hot" json:"is_hot"`
    }

    PhotoSpecGetListRespForm struct {
        PaginationResponse
        Row []models.PhotoSpec `json:"row"`
    }
)

type (
    PhotoSpecGetCateListReqForm struct {
    }

    PhotoSpecGetCateListReqItem struct {
        CateName string            `json:"cate_name"`
        Datas    []models.PhotoSpec `json:"datas"`
    }

    PhotoSpecGetCateListRespForm struct {
        Row []PhotoSpecGetCateListReqItem `json:"row"`
    }
)

type (
    PhotoSpecGetListByCateReqForm struct {
        CateName string `form:"cate_name" json:"cate_name" binding:"required"`
    }

    PhotoSpecGetListByCateRespForm struct {
        Row []models.PhotoSpec `json:"row"`
    }
)

type (
    PhotoSpecCutCheckPicReqForm struct {
        File      string `form:"file" json:"file" binding:"required"`
        Id        uint64 `form:"id" json:"id" binding:"required"`
        IsFair    int8   `form:"is_fair" json:"is_fair"`
        FairLevel int8   `form:"fair_level" json:"fair_level"`
        Color     string `form:"color" json:"color"`
    }

    PhotoSpecCutCheckPicRespForm struct {
        PhotoWmUrl     string `json:"photo_wm_url"`
        PrintWmUrl     string `json:"print_wm_url"`
        PhotoName      string `json:"photo_name"`
        Check          int8   `json:"check"`
        CheckRes       string `json:"check_res"`
        SpecPx         string `gorm:"type:varchar(100);default:'';NOT NULL;comment:规格像素" json:"spec_px"`
        SpecSizeWidth  string `json:"spec_size_width"`
        SpecSizeHeight string `json:"spec_size_height"`
        SpecPxWidth    string `json:"spec_px_width"`
        SpecPxHeight   string `json:"spec_px_height"`
    }
)

type (
    PhotoSpecCutChangeClothesReqForm struct {
        File      string `form:"file" json:"file" binding:"required"`
        Id        uint64 `form:"id" json:"id" binding:"required"`
        FairLevel int8   `form:"fair_level" json:"fair_level"`
        Color     string `form:"color" json:"color"`
        Clothes   string `form:"clothe" json:"clothe" binding:"required"`
    }

    PhotoSpecCutChangeClothesRespForm struct {
        PhotoWmUrl     string `json:"photo_wm_url"`
        PrintWmUrl     string `json:"print_wm_url"`
        PhotoName      string `json:"photo_name"`
        SpecSizeWidth  string `json:"spec_size_width"`
        SpecSizeHeight string `json:"spec_size_height"`
        SpecPxWidth    string `json:"spec_px_width"`
        SpecPxHeight   string `json:"spec_px_height"`
    }
)

type (
    PhotoSpecEnvPicReqForm struct {
        File string `form:"file" json:"file" binding:"required"`
    }

    PhotoSpecEnvPicRespForm struct {
        Check int8   `json:"check"`
        Res   string `json:"res"`
    }
)

type (
    PhotoSpecCutPicReqForm struct {
        File      string `form:"file" json:"file" binding:"required"`
        Id        uint64 `form:"id" json:"id" binding:"required"`
        IsFair    int8   `form:"is_fair" json:"is_fair"`
        FairLevel int8   `form:"fair_level" json:"fair_level"`
        Color     string `form:"color" json:"color"`
    }

    PhotoSpecCutPicRespForm struct {
        ImageUrl string `json:"image_url"`
    }
)